<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>

<body>
    <div id="info"></div>

    <script>
        var userInfo = {
            name: '花花',
            age: 25,
            sex: '男',
        };
        var div = document.getElementById('info');
        var userTag = `
        <ul>
            <li>${userInfo.name}</li>
            <li>${userInfo.age}</li>
            <li>${userInfo.sex}</li>
        </ul>
        `;
        div.innerHTML = userTag;
    </script>
</body>

</html>